<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        div {
            height: 100px;
            width: 100px;
            background-color: red;
            margin-top:100px;
        }
        a{  
            margin-left:auto;
            margin-right: auto;
            height: 100px;
            width: 100px;
            background-color: yellow;  
            display: block;
        }
        body{text-align:center;}
    </style>
</head>

<body>
    <!-- 块标签
        特点：1.独占一行
        2.可以设置宽高
    -->
    <div>div</div>
    <p>p</p>
    <h1>h1</h1>
    <!-- 内联标签
        特点1.并排显示
        2.不能设置width，height
        3.不能设置margin-top,margin-bottom
    -->
    <a href="">a</a>
    <span>span</span>
    <strong>strong</strong>
    <i>i</i>
    <em>em</em>
    <p></p>
    <!-- 内联块
        特点：1.可以设置宽高
            2.并排显示
    -->
    <img src="images/icon1.png" alt="">
    <input type="text">
    <button>按钮</button>
</body>

</html>